/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React from 'react';
import {
  SafeAreaView,
  StyleSheet,
  ScrollView,
  View,
  Text,
  StatusBar,
  Image
} from 'react-native';

import {
  Header,
  LearnMoreLinks,
  Colors,
  DebugInstructions,
  ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';

import BD_noRepeat from './src/BD_noRepeat'
import BD_button from './src/BD_button'
import BD_dashed  from './src/BD_dashed'
import Example from './example/index'


console.ignoredYellowBox = ['Warning: BackAndroid is deprecated. Please use BackHandler instead.','source.uri should not be an empty string','Invalid props.style key'];

console.disableYellowBox = true // 关闭全部黄色警告

const mockApi = function(){
  return new Promise(function(resolve, reject) {
    
    setTimeout(() => {
      resolve(1000);
    }, 2000);
  
    // if (/* 异步操作成功 */){
      
    // } else {
    //   reject(error);
    // }
  });
}


const App = () => {
  return (
    <View>
      <Example></Example>
      {/* <BD_noRepeat flagType="time" timeInterval={5} pressHandler={()=>{
      return mockApi()
    }}>
      <Image source={require('./src/img/timg.jpg')} style={{width: 20, height: 20}}></Image>
    </BD_noRepeat>
    <BD_dashed width={99}></BD_dashed> */}
     
    </View>
    
    
  );
};

const styles = StyleSheet.create({
  scrollView: {
    backgroundColor: Colors.lighter,
  },
  engine: {
    position: 'absolute',
    right: 0,
  },
  body: {
    backgroundColor: Colors.white,
  },
  sectionContainer: {
    marginTop: 32,
    paddingHorizontal: 24,
  },
  sectionTitle: {
    fontSize: 24,
    fontWeight: '600',
    color: Colors.black,
  },
  sectionDescription: {
    marginTop: 8,
    fontSize: 18,
    fontWeight: '400',
    color: Colors.dark,
  },
  highlight: {
    fontWeight: '700',
  },
  footer: {
    color: Colors.dark,
    fontSize: 12,
    fontWeight: '600',
    padding: 4,
    paddingRight: 12,
    textAlign: 'right',
  },
});

export default App;
